package com.atguigu.mybatis.mapper;

import com.atguigu.mybatis.bean.Emp;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.Map;

@Mapper
public interface EmpReturnValueMapper {

    Integer countEmp();

    BigDecimal getEmpSalaryById(Long id);

    // 用@MapKey指定返回值类型key的类型
    @MapKey("id")
    Map<Long, Emp> getAllMap();
}
